#include<iostream>
using namespace std;

void print(int(*p)[5], int r, int l)
{
	for (int i = 0; i < r; i++) {
		for (int j = 0; j < l; j++) {
			printf("%d ", *(*(p + i) + j));
		}
		cout << endl;
	}
}
int main()
{
	//char* p1 = "abcde";
	/*int arr1[] = { 1,2,3,4,5 };
	int arr2[] = { 2,3,4,5,6 };
	int arr3[] = { 3,4,5,6,7 };
	int* p[3] = { arr1,arr2,arr3 };
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 5; j++) {
			printf("%d ", *(p[i] + j));
		}
		cout << endl;
	}*/
	/*int arr[] = { 1,2,3,4,5 };
	int(*p1)[5] = &arr;
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (int i = 0; i < sz; i++) {
		printf("%d ", *(*p1 + i));
	}*/

	int a[3][5] = { 1,2,3,4,5,2,3,4,5,6,3,4,5,6,7 };
	print(a, 3, 5);
	return 0;
}